package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysRegisteredMapper;
import com.ruoyi.system.domain.SysRegistered;
import com.ruoyi.system.service.ISysRegisteredService;

/**
 * 挂号Service业务层处理
 *
 * @author ruoyi
 * @date 2022-11-11
 */
@Service
public class SysRegisteredServiceImpl implements ISysRegisteredService
{
    @Autowired
    private SysRegisteredMapper sysRegisteredMapper;

    /**
     * 查询挂号
     *
     * @param registeredId 挂号主键
     * @return 挂号
     */
    @Override
    public SysRegistered selectSysRegisteredByRegisteredId(Long registeredId)
    {
        return sysRegisteredMapper.selectSysRegisteredByRegisteredId(registeredId);
    }

    /**
     * 查询挂号列表
     *
     * @param sysRegistered 挂号
     * @return 挂号
     */
    @Override
    public List<SysRegistered> selectSysRegisteredList(SysRegistered sysRegistered)
    {
        return sysRegisteredMapper.selectSysRegisteredList(sysRegistered);
    }

    /**
     * 新增挂号
     *
     * @param sysRegistered 挂号
     * @return 结果
     */
    @Override
    public int insertSysRegistered(SysRegistered sysRegistered)
    {
        sysRegistered.setCreateTime(DateUtils.getNowDate());
        return sysRegisteredMapper.insertSysRegistered(sysRegistered);
    }

    /**
     * 修改挂号
     *
     * @param sysRegistered 挂号
     * @return 结果
     */
    @Override
    public int updateSysRegistered(SysRegistered sysRegistered)
    {
        sysRegistered.setUpdateTime(DateUtils.getNowDate());
        return sysRegisteredMapper.updateSysRegistered(sysRegistered);
    }

    /**
     * 批量删除挂号
     *
     * @param registeredIds 需要删除的挂号主键
     * @return 结果
     */
    @Override
    public int deleteSysRegisteredByRegisteredIds(Long[] registeredIds)
    {
        return sysRegisteredMapper.deleteSysRegisteredByRegisteredIds(registeredIds);
    }

    /**
     * 删除挂号信息
     *
     * @param registeredId 挂号主键
     * @return 结果
     */
    @Override
    public int deleteSysRegisteredByRegisteredId(Long registeredId)
    {
        return sysRegisteredMapper.deleteSysRegisteredByRegisteredId(registeredId);
    }
}
